#ifndef MOTION_PROC_H
#define MOTION_PROC_H
#include<QString>
#include<QObject>
          //Question1. 枚举不能从数据库中获得
enum MOTIONTYPE{ACTUNIT, DEACTUNIT, MOVEABSJ, MOVEC, MOVECAO,
                MOVECDO, MOVECGO,   MOVEEXTJ, MOVEJ, MOVEJAO,
                MOVEJDO, MOVEJGO,   MOVEL,  MOVELAO, MOVELDO,
                MOVELGO, SEARCHC,   SEARCHEXTJ, SEARCHL};

struct Motion{
    MOTIONTYPE motiontype;
    QString name;
    QString var1, var2, var3, var4, var5, var6;
};

class Motion_Proc: public QObject
{
    Q_OBJECT
    Q_PROPERTY(int flag READ flag WRITE setFlag)
    Q_ENUMS(MOTIONTYPE)
public:

    Motion_Proc(QObject *parent = 0);


    Q_INVOKABLE Motion getMotion(MOTIONTYPE motionType);
    int flag();
    void setFlag(int flg);

    Motion moveC, moveL;
    int m_flag;

};

#endif // MOTION_PROC_H
